<!DOCTYPE html>
<html>
<head>
	<title>录入快递 -- 快件e栈服务平台</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	
	<link href="css/normalize.css" type="text/css" rel="stylesheet" />
	<link href="css/common.css" type="text/css" rel="stylesheet" />
	<script src="js/jquery.min.js" type="text/javascript"></script>
	<script src="js/common.js" type="text/javascript"></script>
	<script src="js/notice.js" type="text/javascript"></script>
	<script src="js/regexp.js" type="text/javascript"></script>
	<script src="js/jweixin-1.2.0.js" type="text/javascript"></script>
	<style type="text/css">
		.content{
			position: relative;
		}
		.expEnterCont{
			padding-bottom: 20px;
		}
		.expEnterCont .expEnterIcon{
			width: 20%;
			margin: 0 auto;
		}
		.expEnterCont .expEnterIcon p{
			text-align: center;
			font-weight: bold;
		}

		.submitBtn{
			width: 90%;
			margin: 0 auto;
			text-align: center;
			line-height: 46px;
			border-radius: 23px;
			background: #1f72ff;
			color: #fff;
			font-weight: bolder;
		}
		
		.stopvoicerecord{
			width: 40%; 
			height: 50px;
			position: absolute;
			top: 20px;
			right: 40px;
			display: none;
			background:purple;
		}
		
		.stopvoicerecord{
			position: absolute;
			top: 0%;
			left: 0%;
			width: 100%;
			height: 100%;
			background-color: rgba(0,0,0,0.5);
			z-index: 1001;
			display: none;
		}
		.stopvoicerecord .voiceRecordCont{
			width: 60%; 
			background: #fff;
			border-radius: 8px;
			position: absolute;
			top: calc((100% - 216px) / 2);  /*30 + 110 +30 + 10 +36 == 216*/
			left: 20%;
			padding: 20px 0px 10px;
		}
		.stopvoicerecord .voiceRecordCont img{
			display: block;
			margin: 0 auto;
			width: 110px;
		}
		.stopvoicerecord .voiceRecordCont .voiceRecordState{
			margin: 0px;
			text-align: center;
			font-size: 14px;
			color: #777777;
			line-height: 30px;
		}
		.stopvoicerecord .voiceRecordCont #stopVoiceRecordBtn{
			margin: 10px auto 0px;
			width: 90%; 
			text-align: center;
			line-height: 36px;
			background: #3eb94e;
			font-size: 14px;
			color: #fff;
			font-weight: bold;
			border-radius: 18px;
		}
	</style>
</head>
<body>
<div class="content">


	<div class="expEnterCont">
		<div class="expEnterIcon">
			<img src="images/expentericon.png" width="100%">
			<p>录入快递</p>
		</div>
		<div class="expEnterInput">
			<form id="form">
				<div class="userInputCont">
					<div class="inputTypeCont">
						<div class="inputTitle">单号</div>
						<input type="text" id="number" class="commonInputFunc" name="number" placeholder="请输入快递单号...">
					</div>
					<div class="inputTypeCont">
						<div class="inputTitle">姓名</div>
						<input type="text" id="username" class="commonInputFunc" name="username" placeholder="请输入收件人姓名">
					</div>
					<div class="inputTypeCont">
						<div class="inputTitle">手机</div>
						<input type="text" id="userPhone" class="commonInputFunc" name="userPhone" placeholder="录入后短信自动提醒">
					</div>

					<div class="inputTypeCont">
						<div class="inputTitle">快递公司</div>
						<select id="company" name="company" >
							<option >安能快递</option>
							<option>安能物流</option>
							<option >包裹信件</option>
							<option >晟邦物流</option>
							<option >城市100</option>
							<option >City-Link</option>
							<option >COE</option>
							<option >传喜物流</option>
							<option >德邦快递</option>
							<option >大田物流</option>
							<option >递四方</option>
							<option >DHL德国</option>
							<option >DHL全球</option>
							<option >DHL中国</option>
							<option >EMS</option>
							<option >EMS国际</option>
							<option >中速快递</option>
                         </select>  
					</div>
				</div>

			</form>
			<div class="submitBtn" id="submitBtn">录入信息</div>
		</div>
	</div>
</div>
<script src="/admin/assets/layui.all.js"></script>
<script type="text/javascript" src="/qrcode/jquery-3.5.1.min.js"></script>
<script  type="text/javascript" src="/layer/layer.js"></script>
<script>
	let form = layui.form,
			layer = layui.layer;
</script>
<script>

	$(function(){
		$("#submitBtn").click(function(){
			let windowId = layer.load();
			let number = $("input:eq(0)").val();
			let username = $("input:eq(1)").val();
			let userPhone = $("input:eq(2)").val();
			let company = $("#company option:selected").val();

			$.post("/wx/addExpress/insert.do",{
				number:number,
				username:username,
				userPhone:userPhone,
				company:company
			},function(data){
				layer.close(windowId);
				layer.msg(data.result);
				if(data.status == 0){
					//录入成功
					layer.msg(data.result)
				}else{
					//录入失败
				}
			});

		});


	});
</script>
</body>
</html>